home *** CD-ROM | disk | FTP | other *** search
/ How to Get Online 1996 Spring / HOW2GON.ISO / mac / Servers & CGI / CmmCGI / Documentation / HTML2_0.DOC Part 1 < prev    next >
Encoding:
Text File  |  1996-02-06  |  17.0 KB  |  501 lines  |  [ttro/ttxt]

  1. This document has been altered to only include the tag definitions by
  2. Nombas. It was derived from the html 2.0 spec
  3.  
  4. Network Working Group                                    T. Berners-Lee
  5. Request for Comments: 1866                                      MIT/W3C
  6. Category: Standards Track                                   D. Connolly
  7.                                                           November 1995
  8.                     Hypertext Markup Language - 2.0
  9.  
  10.    HTML has been in use by the World Wide Web (WWW) global information
  11.    initiative since 1990. This specification roughly corresponds to the
  12.    capabilities of HTML in common use prior to June 1994. HTML is an
  13.    application of ISO Standard 8879:1986 Information Processing Text and
  14.    Office Systems; Standard Generalized Markup Language (SGML).
  15.  
  16.  
  17. 1. Introduction
  18.  
  19.    The HyperText Markup Language (HTML) is a simple data format used to
  20.    create hypertext documents that are portable from one platform to
  21.    another. HTML documents are SGML documents with generic semantics
  22.    that are appropriate for representing information from a wide range
  23.    of domains.
  24.  
  25. 3.2.2. Tags
  26.  
  27.    Tags delimit elements such as headings, paragraphs, lists, character
  28.    highlighting, and links. Most HTML elements are identified in a
  29.    document as a start-tag, which gives the element name and attributes,
  30.    followed by the content, followed by the end tag. Start-tags are
  31.    delimited by `<' and `>'; end tags are delimited by `</' and `>'. An
  32.    example is:
  33.  
  34.    <H1>This is a Heading</H1>
  35.  
  36.    Some elements only have a start-tag without an end-tag. For example,
  37.    to create a line break, use the `<BR>' tag.  Additionally, the end
  38.    tags of some other elements, such as Paragraph (`</P>'), List Item
  39.    (`</LI>'), Definition Term (`</DT>'), and Definition Description
  40.    (`</DD>') elements, may be omitted.
  41.  
  42. 5. Document Structure
  43.  
  44.    An HTML document is a tree of elements, including a head and body,
  45.    headings, paragraphs, lists, etc. Form elements are discussed in 8,
  46.    "Forms".
  47.  
  48.    The HTML document element consists of a head and a body, much like a
  49.    memo or a mail message. The head contains the title and optional
  50.    elements. The body is a text flow consisting of paragraphs, lists,
  51.    and other elements.
  52.  
  53. 5.2. Head: HEAD
  54.  
  55.    The head of an HTML document is an unordered collection of
  56.    information about the document. For example:
  57.  
  58.     <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  59.     <HEAD>
  60.     <TITLE>Introduction to HTML</TITLE>
  61.     </HEAD>
  62.     ...
  63.  
  64. 5.2.1. Title: TITLE
  65.  
  66.    Every HTML document must contain a <TITLE> element.
  67.  
  68.    The title should identify the contents of the document in a global
  69.    context. A short title, such as "Introduction" may be meaningless out
  70.    of context. A title such as "Introduction to HTML Elements" is more
  71.    appropriate.
  72.  
  73.       NOTE - The length of a title is not limited; however, long titles
  74.       may be truncated in some applications. To minimize this
  75.       possibility, titles should be fewer than 64 characters.
  76.  
  77.    A user agent may display the title of a document in a history list or
  78.    as a label for the window displaying the document. This differs from
  79.    headings (5.4, "Headings: H1 ... H6"), which are typically displayed
  80.    within the body text flow.
  81.  
  82. 5.2.2. Base Address: BASE
  83.  
  84.    The optional <BASE> element provides a base address for interpreting
  85.    relative URLs when the document is read out of context (see 7,
  86.    "Hyperlinks"). The value of the HREF attribute must be an absolute
  87.    URI.
  88.  
  89. 5.2.3. Keyword Index: ISINDEX
  90.  
  91.    The <ISINDEX> element indicates that the user agent should allow the
  92.    user to search an index by giving keywords. See 7.5, "Queries and
  93.    Indexes" for details.
  94.  
  95. 5.2.4. Link: LINK
  96.  
  97.    The <LINK> element represents a hyperlink (see 7, "Hyperlinks").  Any
  98.    number of LINK elements may occur in the <HEAD> element of an HTML
  99.    document. It has the same attributes as the <A> element (see 5.7.3,
  100.    "Anchor: A").
  101.  
  102.    The <LINK> element is typically used to indicate authorship, related
  103.    indexes and glossaries, older or more recent versions, document
  104.    hierarchy, associated resources such as style sheets, etc.
  105.  
  106. 5.2.5. Associated Meta-information: META
  107.  
  108.    The <META> element is an extensible container for use in identifying
  109.    specialized document meta-information.  Meta-information has two main
  110.    functions:
  111.  
  112.         * to provide a means to discover that the data set exists
  113.         and how it might be obtained or accessed; and
  114.  
  115.         * to document the content, quality, and features of a data
  116.         set, indicating its fitness for use.
  117.  
  118.    Each <META> element specifies a name/value pair. If multiple META
  119.    elements are provided with the same name, their combined contents--
  120.    concatenated as a comma-separated list--is the value associated with
  121.    that name.
  122.  
  123.         NOTE - The <META> element should not be used where a
  124.         specific element, such as <TITLE>, would be more
  125.         appropriate. Rather than a <META> element with a URI as
  126.         the value of the CONTENT attribute, use a <LINK>
  127.         element.
  128.  
  129.    HTTP servers may read the content of the document <HEAD> to generate
  130.    header fields corresponding to any elements defining a value for the
  131.    attribute HTTP-EQUIV.
  132.  
  133.         NOTE - The method by which the server extracts document
  134.         meta-information is unspecified and not mandatory. The
  135.         <META> element only provides an extensible mechanism for
  136.         identifying and embedding document meta-information --
  137.         how it may be used is up to the individual server
  138.         implementation and the HTML user agent.
  139.  
  140.  
  141.  
  142.     Attributes of the META element:
  143.  
  144.     HTTP-EQUIV
  145.             binds the element to an HTTP header field. An HTTP
  146.             server may use this information to process the document.
  147.             In particular, it may include a header field in the
  148.             responses to requests for this document: the header name
  149.             is taken from the HTTP-EQUIV attribute value, and the
  150.             header value is taken from the value of the CONTENT
  151.             attribute. HTTP header names are not case sensitive.
  152.  
  153.     NAME
  154.             specifies the name of the name/value pair. If not
  155.             present, HTTP-EQUIV gives the name.
  156.  
  157.     CONTENT
  158.             specifies the value of the name/value pair.
  159.  
  160.     Examples
  161.  
  162.     If the document contains:
  163.  
  164.     <META HTTP-EQUIV="Expires"
  165.           CONTENT="Tue, 04 Dec 1993 21:29:02 GMT">
  166.     <meta http-equiv="Keywords" CONTENT="Fred">
  167.     <META HTTP-EQUIV="Reply-to"
  168.           content="fielding@ics.uci.edu (Roy Fielding)">
  169.     <Meta Http-equiv="Keywords" CONTENT="Barney">
  170.  
  171.     then the server may include the following header fields:
  172.  
  173.     Expires: Tue, 04 Dec 1993 21:29:02 GMT
  174.     Keywords: Fred, Barney
  175.     Reply-to: fielding@ics.uci.edu (Roy Fielding)
  176.  
  177.     as part of the HTTP response to a `GET' or `HEAD' request for
  178.     that document.
  179.  
  180.     An HTTP server must not use the <META> element to form an HTTP
  181.     response header unless the HTTP-EQUIV attribute is present.
  182.  
  183.     An HTTP server may disregard any <META> elements that specify
  184.     information controlled by the HTTP server, for example `Server',
  185.  
  186.     `Date', and `Last-modified'.
  187.  
  188.  
  189. 5.3. Body: BODY
  190.  
  191.    The <BODY> element contains the text flow of the document, including
  192.    headings, paragraphs, lists, etc.
  193.  
  194.    For example:
  195.  
  196.     <BODY>
  197.     <h1>Important Stuff</h1>
  198.     <p>Explanation about important stuff...
  199.     </BODY>
  200.  
  201. 5.4. Headings: H1 ... H6
  202.  
  203.    The six heading elements, <H1> through <H6>, denote section headings.
  204.    Although the order and occurrence of headings is not constrained by
  205.    the HTML DTD, documents should not skip levels (for example, from H1
  206.    to H3), as converting such documents to other representations is
  207.    often problematic.
  208.  
  209.    Example of use:
  210.  
  211.     <H1>This is a heading</H1>
  212.     Here is some text
  213.     <H2>Second level heading</H2>
  214.     Here is some more text.
  215.  
  216.     Typical renderings are:
  217.  
  218.     H1
  219.             Bold, very-large font, centered. One or two blank lines
  220.             above and below.
  221.  
  222.     H2
  223.             Bold, large font, flush-left. One or two blank lines
  224.             above and below.
  225.  
  226.  
  227.     H3
  228.             Italic, large font, slightly indented from the left
  229.             margin. One or two blank lines above and below.
  230.  
  231.     H4
  232.             Bold, normal font, indented more than H3. One blank line
  233.             above and below.
  234.  
  235.     H5
  236.             Italic, normal font, indented as H4. One blank line
  237.             above.
  238.  
  239.     H6
  240.             Bold, indented same as normal text, more than H5. One
  241.             blank line above.
  242.  
  243. 5.5. Block Structuring Elements
  244.  
  245.    Block structuring elements include paragraphs, lists, and block
  246.    quotes. They must not contain heading elements, but they may contain
  247.    phrase markup, and in some cases, they may be nested.
  248.  
  249. 5.5.1. Paragraph: P
  250.  
  251.    The <P> element indicates a paragraph. The exact indentation, leading
  252.    space, etc. of a paragraph is not specified and may be a function of
  253.    other tags, style sheets, etc.
  254.  
  255.    Typically, paragraphs are surrounded by a vertical space of one line
  256.    or half a line. The first line in a paragraph is indented in some
  257.    cases.
  258.  
  259.    Example of use:
  260.  
  261.     <H1>This Heading Precedes the Paragraph</H1>
  262.     <P>This is the text of the first paragraph.
  263.     <P>This is the text of the second paragraph. Although you do not
  264.     need to start paragraphs on new lines, maintaining this
  265.     convention facilitates document maintenance.</P>
  266.     <P>This is the text of a third paragraph.</P>
  267.  
  268. 5.5.2. Preformatted Text: PRE
  269.  
  270.    The <PRE> element represents a character cell block of text and is
  271.    suitable for text that has been formatted for a monospaced font.
  272.  
  273.    The <PRE> tag may be used with the optional WIDTH attribute. The
  274.    WIDTH attribute specifies the maximum number of characters for a line
  275.  
  276.    and allows the HTML user agent to select a suitable font and
  277.    indentation.
  278.  
  279.    Within preformatted text:
  280.  
  281.         * Line breaks within the text are rendered as a move to the
  282.         beginning of the next line.
  283.  
  284.             NOTE - References to the "beginning of a new line"
  285.             do not imply that the renderer is forbidden from
  286.             using a constant left indent for rendering
  287.             preformatted text. The left indent may be
  288.             constrained by the width required.
  289.  
  290.         * Anchor elements and phrase markup may be used.
  291.  
  292.             NOTE - Constraints on the processing of <PRE>
  293.             content may limit or prevent the ability of the HTML
  294.             user agent to faithfully render phrase markup.
  295.  
  296.         * Elements that define paragraph formatting (headings,
  297.         address, etc.) must not be used.
  298.  
  299.             NOTE - Some historical documents contain <P> tags in
  300.             <PRE> elements. User agents are encouraged to treat
  301.             this as a line break. A <P> tag followed by a
  302.             newline character should produce only one line
  303.             break, not a line break plus a blank line.
  304.  
  305.         * The horizontal tab character (code position 9 in the HTML
  306.         document character set) must be interpreted as the smallest
  307.         positive nonzero number of spaces which will leave the
  308.         number of characters so far on the line as a multiple of 8.
  309.         Documents should not contain tab characters, as they are not
  310.         supported consistently.
  311.  
  312.     Example of use:
  313.  
  314.     <PRE>
  315.     Line 1.
  316.            Line 2 is to the right of line 1.     <a href="abc">abc</a>
  317.            Line 3 aligns with line 2.            <a href="def">def</a>
  318.     </PRE>
  319.  
  320.  
  321. 5.5.2.1. Example and Listing: XMP, LISTING
  322.  
  323.    The <XMP> and <LISTING> elements are similar to the <PRE> element,
  324.    but they have a different syntax. Their content is declared as CDATA,
  325.    which means that no markup except the end-tag open delimiter-in-
  326.    context is recognized (see 9.6 "Delimiter Recognition" of [SGML]).
  327.  
  328.       NOTE - In a previous draft of the HTML specification, the syntax
  329.       of <XMP> and <LISTING> elements allowed closing tags to be treated
  330.       as data characters, as long as the tag name was not <XMP> or
  331.       <LISTING>, respectively.
  332.  
  333.    Since CDATA declared content has a number of unfortunate interactions
  334.    with processing techniques and tends to be used and implemented
  335.    inconsistently, HTML documents should not contain <XMP> nor <LISTING>
  336.    elements -- the <PRE> tag is more expressive and more consistently
  337.    supported.
  338.  
  339.    The <LISTING> element should be rendered so that at least 132
  340.    characters fit on a line. The <XMP> element should be rendered so
  341.    that at least 80 characters fit on a line but is otherwise identical
  342.    to the <LISTING> element.
  343.  
  344.       NOTE - In a previous draft, HTML included a <PLAINTEXT> element
  345.       that is similar to the <LISTING> element, except that there is no
  346.       closing tag: all characters after the <PLAINTEXT> start-tag are
  347.       data.
  348.  
  349. 5.5.3. Address: ADDRESS
  350.  
  351.    The <ADDRESS> element contains such information as address, signature
  352.    and authorship, often at the beginning or end of the body of a
  353.    document.
  354.  
  355.    Typically, the <ADDRESS> element is rendered in an italic typeface
  356.    and may be indented.
  357.  
  358.    Example of use:
  359.  
  360.     <ADDRESS>
  361.     Newsletter editor<BR>
  362.     J.R. Brown<BR>
  363.     JimquickPost News, Jimquick, CT 01234<BR>
  364.     Tel (123) 456 7890
  365.     </ADDRESS>
  366.  
  367.  
  368. 5.5.4. Block Quote: BLOCKQUOTE
  369.  
  370.    The <BLOCKQUOTE> element contains text quoted from another source.
  371.  
  372.    A typical rendering might be a slight extra left and right indent,
  373.    and/or italic font. The <BLOCKQUOTE> typically provides space above
  374.    and below the quote.
  375.  
  376.    Single-font rendition may reflect the quotation style of Internet
  377.    mail by putting a vertical line of graphic characters, such as the
  378.    greater than symbol (>), in the left margin.
  379.  
  380.    Example of use:
  381.  
  382.     I think the play ends
  383.     <BLOCKQUOTE>
  384.     <P>Soft you now, the fair Ophelia. Nymph, in thy orisons, be all
  385.     my sins remembered.
  386.     </BLOCKQUOTE>
  387.     but I am not sure.
  388.  
  389. 5.6. List Elements
  390.  
  391.    HTML includes a number of list elements. They may be used in
  392.    combination; for example, a <OL> may be nested in an <LI> element of
  393.    a <UL>.
  394.  
  395.    The COMPACT attribute suggests that a compact rendering be used.
  396.  
  397. 5.6.1. Unordered List: UL, LI
  398.  
  399.    The <UL> represents a list of items -- typically rendered as a
  400.    bulleted list.
  401.  
  402.    The content of a <UL> element is a sequence of <LI> elements.  For
  403.    example:
  404.  
  405.     <UL>
  406.     <LI>First list item
  407.     <LI>Second list item
  408.      <p>second paragraph of second item
  409.     <LI>Third list item
  410.     </UL>
  411.  
  412. 5.6.2. Ordered List: OL
  413.  
  414.    The <OL> element represents an ordered list of items, sorted by
  415.    sequence or order of importance. It is typically rendered as a
  416.  
  417.    numbered list.
  418.  
  419.    The content of a <OL> element is a sequence of <LI> elements.  For
  420.    example:
  421.  
  422.     <OL>
  423.     <LI>Click the Web button to open URI window.
  424.     <LI>Enter the URI number in the text field of the Open URI
  425.     window. The Web document you specified is displayed.
  426.       <ol>
  427.        <li>substep 1
  428.        <li>substep 2
  429.       </ol>
  430.     <LI>Click highlighted text to move from one link to another.
  431.     </OL>
  432.  
  433. 5.6.3. Directory List: DIR
  434.  
  435.    The <DIR> element is similar to the <UL> element. It represents a
  436.    list of short items, typically up to 20 characters each. Items in a
  437.    directory list may be arranged in columns, typically 24 characters
  438.    wide.
  439.  
  440.    The content of a <DIR> element is a sequence of <LI> elements.
  441.    Nested block elements are not allowed in the content of <DIR>
  442.    elements. For example:
  443.  
  444.     <DIR>
  445.     <LI>A-H<LI>I-M
  446.     <LI>M-R<LI>S-Z
  447.     </DIR>
  448.  
  449. 5.6.4. Menu List: MENU
  450.  
  451.    The <MENU> element is a list of items with typically one line per
  452.    item. The menu list style is typically more compact than the style of
  453.    an unordered list.
  454.  
  455.    The content of a <MENU> element is a sequence of <LI> elements.
  456.    Nested block elements are not allowed in the content of <MENU>
  457.    elements. For example:
  458.  
  459.     <MENU>
  460.     <LI>First item in the list.
  461.     <LI>Second item in the list.
  462.     <LI>Third item in the list.
  463.     </MENU>
  464.  
  465. 5.6.5. Definition List: DL, DT, DD
  466.  
  467.    A definition list is a list of terms and corresponding definitions.
  468.    Definition lists are typically formatted with the term flush-left and
  469.    the definition, formatted paragraph style, indented after the term.
  470.  
  471.    The content of a <DL> element is a sequence of <DT> elements and/or
  472.    <DD> elements, usually in pairs. Multiple <DT> may be paired with a
  473.    single <DD> element. Documents should not contain multiple
  474.    consecutive <DD> elements.
  475.  
  476.    Example of use:
  477.  
  478.     <DL>
  479.     <DT>Term<DD>This is the definition of the first term.
  480.     <DT>Term<DD>This is the definition of the second term.
  481.     </DL>
  482.  
  483.    If the DT term does not fit in the DT column (typically one third of
  484.    the display area), it may be extended across the page with the DD
  485.    section moved to the next line, or it may be wrapped onto successive
  486.    lines of the left hand column.
  487.  
  488.    The optional COMPACT attribute suggests that a compact rendering be
  489.    used, because the list items are small and/or the entire list is
  490.    large.
  491.  
  492.    Unless the COMPACT attribute is present, an HTML user agent may leave
  493.    white space between successive DT, DD pairs. The COMPACT attribute
  494.    may also reduce the width of the left-hand (DT) column.
  495.  
  496.     <DL COMPACT>
  497.     <DT>Term<DD>This is the first definition in compact format.
  498.     <DT>Term<DD>This is the second definition in compact format.
  499.     </DL>
  500.  
  501.